package com.project.blog.controller;

import com.project.blog.common.result.Result;
import com.project.blog.entity.Tag;
import com.project.blog.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 标签api
 */
@RestController
@RequestMapping(value = "/tags")
public class TagController {


    @Autowired
    private TagService tagService;

    @GetMapping
 //   @LogAnnotation(module = "标签", operation = "获取所有标签")
    public Result listTags() {
        List<Tag> tags = tagService.findAll();
        return Result.success(tags);
    }



}
